/*
//此为模板中给出的代码
import SimpleLineChart from '@/components/LineChart/SimpleLineChart'
import { Box } from '@mui/material'
import { useEffect, useState } from 'react'

export default function Home() {
    const [data, setData] = useState([])
    useEffect(() => {
        const fetchData = async () => {
            try {
                // 发起 GET 请求
                const res = await fetch(
                    'https://api.virapi.com/vir_gitee2dg0128ddeh4g/test1/lineChart',
                    {
                        headers: {
                            'app-token':
                                '$2a$10$XpRla239XyesXgemEZJzx.QttTaAPZ6evugMp9NgyFoTX143htS1S',
                        },
                    },
                )
                // 检查响应状态
                if (!res.ok) {
                    throw new Error(`HTTP error! Status: ${res.status}`)
                }

                // 解析响应体中的 JSON 数据
                const data = await res.json()
                console.log('data', data.data.lineChartData)
                setData(data.data.lineChartData)
            } catch (err) {
                console.error(err)
            }
        }

        fetchData()
    }, [])

    return (
        <Box
            flex="1"
            display="flex"
            alignItems="center"
            justifyContent="center"
            width="100%"
            border="10px solid blue"
        >
            <Box
                minWidth="100%"
                maxHeight="100%"
                display="flex"
                alignItems="center"
                justifyContent="center"
            >
                <SimpleLineChart data={data} />
            </Box>
        </Box>
    )
}
*/

//欢迎界面
import { Button, Flex} from 'antd'; //导入antd组件
import React from 'react';
import Link from 'next/link'; 
import welcomeStyles from '../styles/welcomePage.module.css'; // 导入CSS样式

//  Logo 图片存放在 public/logo2.png
const logoSrc = '/logo10.png';

const WelcomePage = () => {
  return (
    <div className={welcomeStyles.backgroundContainer}> 
      <h1 className={welcomeStyles.welcomeText}>Welcome to FinFinite !</h1>       {/* 欢迎文字 */}
      <h1 className={welcomeStyles.subtitleText}>——One stop intelligent Quant trading platform.</h1>
      <img src={logoSrc} alt="Logo" className={welcomeStyles.logo} />             {/* 导入Logo图片 */}
      <Link href="/login">                                                        {/* 跳转到登录页面 */}
        <Button ghost className={welcomeStyles.button}> Log in </Button>
      </Link>
      <br />
      <Link href="/register1">                                                     {/* 跳转到注册页面 */}
        <Button ghost className={welcomeStyles.button}>Register</Button>
      </Link>
    </div>
  );
};

export default WelcomePage;
